package com.plian.system.entity.pm.annualdonationrecordmain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.plian.Tools.DateUtil;
import com.plian.system.entity.pm.annualdonationrecord.AnnualDonationRecord;
import com.plian.system.mybatis.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.List;

/**
 * 企业年度捐赠计划备案实体类
 *
 * @author gangan
 * @since 2019-10-24
 */
@Data
@TableName("cqzc_annual_donation_record_main")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "企业年度捐赠计划备案实体类", description = "企业年度捐赠计划备案实体类")
public class AnnualDonationRecordMain extends BaseEntity {

    private static final long serialVersApiID = 1L;

    /**
     * 单据编码
     */
    @ApiModelProperty(value = "单据编码")
    private String code;
    /**
     * 备案编号
     */
    @ApiModelProperty(value = "备案编号")
    private String filingCode;
    /**
     * 填报单位
     */
    @ApiModelProperty(value = "填报单位")
    private String reportCompanyId;

    @ApiModelProperty(value = "年度", required = true)
    private String year;
    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;
    /**
     * 乐观锁字段
     */
    private Integer tsVersion;
    /**
     * 版本号
     */
    private String version;
    /**
     * 审批人
     */
    private String approvedUser;
    /**
     * 审批时间
     */
    @DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
    @JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
    private Date approvedTime;
    /**
     * 审批意见
     */
    private String approvedOpinion;
    /**
     * 审批流主键
     */
    private String formType;
    /**
     * 备选1
     */
    private String def1;
    /**
     * 备选2
     */
    private String def2;
    /**
     * 备选3
     */
    private String def3;
    /**
     * 备选4
     */
    private String def4;
    /**
     * 备选5
     */
    private String def5;
    /**
     * 备选6
     */
    private String def6;
    /**
     * 备选7
     */
    private String def7;
    /**
     * 备选8
     */
    private String def8;
    /**
     * 备选9
     */
    private BigDecimal def9;
    /**
     * 备选10
     */
    private BigDecimal def10;
    /**
     * 备选11
     */
    private BigDecimal def11;
    /**
     * 备选12
     */
    private BigDecimal def12;
    /**
     * 备选13
     */
    private BigDecimal def13;
    /**
     * 备选14
     */
    private Date def14;
    /**
     * 备选15
     */
    private Date def15;
    /**
     * 备选16
     */
    private Date def16;
    /**
     * 备选17
     */
    private Date def17;
    /**
     * 备选18
     */
    private Long def18;
    /**
     * 备选19
     */
    private Long def19;
    /**
     * 备选20
     */
    private Long def20;

    /**
     * 子表
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "子表", required = true)
    private List<AnnualDonationRecord> annualDonationRecords;

    @TableField(exist = false)
    private List<HashMap> docList;

    @ApiModelProperty(value = "数据来源 null为系统填报 对应用户id")
    private String dataSource;

    @ApiModelProperty(value = "数据来源id", required = true)
    private String dataSourceId;

    @TableField(exist = false)
    @ApiModelProperty("附件ids")
    private String attachIds;
}
